package com.huang.mapper;

import com.huang.pojo.Order;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrderMapper {

    @Select("select *from orders")
    List<Order> getOrderlist();
     //用户想数据库插入订单数据
    @Insert("insert into orders value(null,#{username},#{atrname},#{ticketle},#{num},#{price})")
    int addOrder(String username, String atrname, String ticketle, Integer num,double price);


    //查询用户的个人订单 信息
    @Select("select  username,atrname,ticketle,num,price from orders where username=#{username}")
    List<Order> getUserOrder(String username);

}
